package com.atguigu.gulimall.product.feign;

import com.atguigu.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author majinhui
 * @description
 * @create 2024/7/31 09:46
 **/
@FeignClient("gulimall-ware")
public interface WareFeignService {


    /**
     * 1、设计时加上泛型
     * 2、直接返回结果不通过R
     * @param skuIds
     * @return
     */
    @PostMapping("/ware/wareSku/hasStock")
    R<Map<Long, Boolean>> getSkusHasStock(@RequestBody List<Long> skuIds);
}
